<?php
ini_set('date.timezone', 'PRC');
session_start();

$c = isset($_GET['c']) ? $_GET['c'] : 'home';
$a = isset($_GET['a']) ? $_GET['a'] : 'index';

$controller = '\\Controllers\\' . ucfirst(strtolower($c)) . 'Controller';
spl_autoload_register('aaaa');
function aaaa($className) {
    $filePath = './' . str_replace('\\', '/', $className) . '.php';
    if (!file_exists($filePath)) {
        echo 'The Controller ' . $className . ' is not exists'; exit;
    }
    include_once $filePath;
}

$app = new $controller();
echo $app->$a();